<div class="navigation">
    <div class="nav">
      <ul id="nav" class="dropdown dropdown-linear">
    
              <%if current_user and (current_user.role_id == 1 or current_user.role_id == 2)%>
              
              <li class="dir">
                <%=link_to(content_tag('span',t('general.users')), :action=>'user_management', :controller=>'welcome') %>
                      <%if current_user.role_id == 1%>
                    <ul>
                      <li><%= link_to t('general.confirm_reject_user'), :action=>'admin_dashboard', :controller=>'welcome'%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('general.examiner'), :action=>'index', :controller=>'users', :create_id => 2%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('welcome.q_setter'), :action=>'index', :controller=>'users', :create_id => 3%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('welcome.examinee'), :action=>'index', :controller=>'users', :create_id => 4%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('general.group_user'), :action=>'groupUser', :controller=>'users'%></li>
                      <li style="padding:5px 5px 0 5px">|</li>  
                      <li><%= link_to t('general.activate'), :action=>'activate_inactivate', :controller=>'users'%></li>
                      <li style="padding:5px 5px 0 5px">|</li>                                 
                    </ul>
                  <%end%>
                  <%if current_user.role_id == 2%>
                    <ul>
                      <li><%= link_to t('welcome.q_setter'), :action=>'index', :controller=>'users', :create_id => 3%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('welcome.examinee'), :action=>'index', :controller=>'users', :create_id => 4%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('general.group_user'), :action=>'groupUser', :controller=>'users'%></li>
                      <li style="padding:5px 5px 0 5px">|</li>                  
                    </ul>
                  <%end%>
              </li>
              <li>
                <%=link_to(content_tag('span',t('general.subjects')),:action=>'index', :controller=>'subjects') %>
              </li>
              <li>
                <%=link_to(content_tag('span',t('general.questions')),:action=>'index', :controller=>'questions') %>
              </li>
              <li>
                <%=link_to(content_tag('span',t('general.exams')), :action=>'index', :controller=>'exams') %>
                    <ul>
                      <li><%= link_to t('general.create_exam'),:action=>"scheduleExam", :controller=>"exams" %></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('general.examtype'),:action=>"listExamtypes", :controller=>"exams" %></li>
                      <li style="padding:5px 5px 0 5px">|</li>                    
                      <li><%= link_to t('general.assignexam'),:action=>"assignExam",:controller=>'exams'%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('general.selectquestions'),:action=>"selectQuestion", :controller=>"exams" %></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('general.assignexaminees'),:action=>"selectExaminee", :controller=>"exams" %></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('evaluate.evaluate_exam'),:action=>"evaluate", :controller=>"exams" %></li>
                      <li style="padding:5px 5px 0 5px">|</li>      
                      <li><%= link_to t('evaluate.evaluators'),:action=>"evaluator", :controller=>"exams" %></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('evaluate.assign_evaluator'),:action=>"getEvaluator", :controller=>"exams" %></li>
                      <li style="padding:5px 5px 0 5px">|</li>                                                  
                    </ul>
              </li>
              <li>
                <%=link_to(content_tag('span',t('general.result')), :action=>'index', :controller=>'results') %>
                  <ul>
                      <li><%= link_to t('result.examinees_result'), :action=>"usersResult", :controller=>"results"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('result.exams_result'), :action=>"examsResult", :controller=>"results"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('result.department_result'), :action=>"departmentResult", :controller=>"results"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                  </ul>
              </li>
              <li>
              </li>
              <li>
              </li>
              <li class="dir">
                <%=link_to(content_tag('span',t('general.org_levels')), :action=>'index', :controller=>'category_titles') %>
                
                
<%unless @organization_id == nil && @category_types.blank?%>
                <ul>
                    <% @category_types.each do |category_type| %>
                      <%if category_type.id == 1%>  
                      <li><%=link_to t('org.class'), :action=>'index', :controller=>"category_titles", :type=>category_type.id%></li>
                      <li style="padding:5px 5px 0 5px">|</li>  
                      <%elsif category_type.id == 3%>   
                      <li><%=link_to t('general.course'), :action=>'index', :controller=>"category_titles", :type=>category_type.id%></li>
                      <li style="padding:5px 5px 0 5px">|</li>                       
                      <%elsif category_type.title == "academic_year"%>  
                      <li><%=link_to t('general.academic_year'), :action=>'index', :controller=>"category_titles", :type=>category_type.id%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <%elsif category_type.title == "department"%> 
                      <li><%=link_to t('general.department'), :action=>'index', :controller=>"category_titles", :type=>category_type.id%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <%elsif category_type.title == "domain"%> 
                      <li><%=link_to "Domain", :action=>'index', :controller=>"category_titles", :type=>category_type.id%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <%elsif category_type.title == "semester"%>   
                      <li><%=link_to t('general.semester'), :action=>'index', :controller=>"category_titles", :type=>category_type.id%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <%elsif category_type.title == "section"%>    
                      <li><%=link_to t('general.section'), :action=>'index', :controller=>"category_titles", :type=>category_type.id%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                     <%end%>     
                   <% end %>
                </ul>
<%end%>
              </li>
              <li>
                <%=link_to(content_tag('span',t('general.category')), :action=>'listCategories', :controller=>'categories') %>
                        <ul>
                      <li><%= link_to t('general.config_category'), :action=>'index', :controller=>'categories', :create_id => 3%></li>
                      <li style="padding:5px 5px 0 5px">|</li>

                    </ul>
              </li>
                  <%if current_user.role_id == 1 %>
                  <li>
                    <%=link_to(content_tag('span',t('general.settings')), :action=>'index', :controller=>'settings') %>
                      <ul>
                      <li><%= link_to t('general.client_image'), :action=>"clientImage", :controller=>"images"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('about.aboutus'), :action=>"index", :controller=>"aboutus"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('client.client_info'), :action=>"index", :controller=>"clientinfo"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>                    
                      </ul>

                  </li>
                  <li>
                  <%=link_to(content_tag('span',t('general.email')), :action=>'index', :controller=>'emails') %>
                  </li>
                  <%end%>
                  <%if current_user.role_id == 1 or current_user.role_id == 2%>
                  <li>
                    <%=link_to(content_tag('span',t('general.reports')), :action=>'index', :controller=>'reports') %>
                     <ul>
                      <li><%= link_to t('general.examinees_report'), :action=>"userReport", :controller=>"reports"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('general.exams_report'), :action=>"examReport", :controller=>"reports"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('reports.overall'), :action=>"departmentReport", :controller=>"reports"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>

                      <li><%= link_to t('general.org_overview'), :action=>"overall", :controller=>"reports"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>  
                      <li><%= link_to t('general.pass_fail'), :action=>"pass_fail", :controller=>"reports"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>                                        
                     </ul>
                  </li> 
                  <%end%>
                  <%if current_user.role_id == 1 %>
                  <li>
                    <%=link_to(content_tag('span',t('general.feedback')), :action=>'index', :controller=>'feedback') %>
                    <ul>
                      <li><%= link_to t('general.feedback_res'), :action=>"feedbackResponse", :controller=>"feedback"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                    </ul>
                  </li>
                  
                  <%end%>
             <%elsif current_user and current_user.role_id == 3%>
               <li><%=link_to(content_tag('span',t('general.questions')),:action=>'index', :controller=>'questions') %></li>
               <li><%=link_to(content_tag('span',t('evaluate.evaluate_exam')),:action=>'evaluate', :controller=>'exams') %></li>
               
             <%elsif current_user and current_user.role_id == 4%>
               <li>
                <%=link_to(content_tag('span',t('general.view_exams')), :action=>'index', :controller=>'attend_exams', :user=>current_user) %>
                      <ul>
                      <li><%= link_to t('exam.pending'), :action=>"pendingExams", :controller=>"attend_exams"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                      <li><%= link_to t('exam.completed'), :action=>"completedExams", :controller=>"attend_exams"%></li>
                      <li style="padding:5px 5px 0 5px">|</li>
                     </ul>
               </li>
                       <li>
                <%if current_user and current_user.role_id == 1%>
                <%=link_to(content_tag('span',t('general.feedback')), :action=>'index', :controller=>'feedback') %>
                <%elsif current_user and current_user.role_id == 4%>
                <%=link_to(content_tag('span',t('general.feedback')), :action=>'viewFeedback', :controller=>'feedback') %>              
                <%end%>
               </li>
               <li>
                <%=link_to(content_tag('span',t('general.result')), :action=>'index', :controller=>'results') %>
               </li>
              <% end %>
      </ul>
    </div>
  </div>